-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(tooltip): announce content to assistive technology #2069
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: cea398a The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for red-hat-design-system ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Size Change: +496 B (+0.24%) Total Size: 208 kB
ℹ️ View Unchanged
|
Looks like this When adding |
i'll try refactoring to using a single, global, visually hidden aria-live region appended to the document body |
On OSX 15.1.1 with VO, this is working in the following browsers:
@hellogreg could we possibly tap you to test screen readers in Windows and maybe iOS/Android? @bennypowers can you confirm this works in Linux? If everything works there, that would be 👏 . |
Results with orca on wayland (fedora silverblue) i think live regions don't work at all for orca and WebKit, at least not on my setup: https://codepen.io/bennyp/pen/MYgJVdR?editors=1001 So all things considered I think we can approve this as best effort - when the browser bugs resolve it will work, and we can't work around it |
This comment/issue is not related to changes in this PR, but it looks like there is an issue with positioning calculation in the left demo where the tooltip is both in a |
Feedback from Greg says that this (mostly) works across various screen readers—which is much better than it not working at all.
I agree with this. PTAL and thanks everyone for your help and feedback. |
Yep, we're at least getting something from all the major browser/reader combos, even if there are some quirks with, say, Android TalkBack/Chrome and Windows Narrator/Edge. |
What I did
.visually-hidden
<div>
witharia-live
in the<body>
so that it can be read by AT.rh-tooltip
.Added anaria-describedby
/id
pair to elements in the lightdom of<rh-tooltip>
Added Markup Guidance to the Accessibility page of<rh-tooltip>
docs.Testing Instructions
Check out the Accessibility page, proofread the Markup Guidance, give feedback.Notes to Reviewers
I couldn't getcustomElements.whenDefined()
working in place ofsetTimeout()
. PTAL and maybe you will have better luck.This PR changes the trigger<rh-button>
elements in the demos to native<button>
elements so that tooltip can be accessible.Closes #2051.